import http from "@/api/index";

interface updatePwdParams {
  newPwd: string,
  newConfirmPwd: string,
}  

export function updatePwd(data: updatePwdParams ): Promise<any> {
  return http.request({
    url: `/admin/auth/updatePwd`,
    method: "POST",
    data:data
  });
}
export function getUserList(data: Object ): Promise<any> {
  return http.request({
    url: `/admin/config/userList`,
    method: "POST",
    data:data
  });
}
export function userSave(data: Object ): Promise<any> {
  return http.request({
    url: `/admin/config/userSave`,
    method: "POST",
    data:data
  });
}
export function delUser(data: Object ): Promise<any> {
  return http.request({
    url: `/admin/config/delUser`,
    method: "POST",
    data:data
  });
}
export function getDeptTree(): Promise<any> {
  return http.request({
    url: `/admin/config/getDeptTree`,
    method: "POST",
    data:{}
  });
}
